package com.blog.utils;

import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class JSONUtil {
	public static JSONArray listToJson(List list) {
		JSONArray listArray=JSONArray.fromObject(list);
		return listArray;
	}
	public static <T> JSONObject BeanToJson(T t) {
		JSONObject json = JSONObject.fromObject(t);
		return json;
	}
}
